Skip to content

Docs: Use !r in __repr__ example#146273

Merged
rhettinger merged 1 commit intopython:mainfrom
petersuttondev:patch-1
Apr 1, 2026
Merged

Docs: Use !r in __repr__ example#146273
rhettinger merged 1 commit intopython:mainfrom
petersuttondev:patch-1

Conversation

@petersuttondev
Copy link
Copy Markdown
Contributor

@petersuttondev petersuttondev commented Mar 22, 2026

Use !r in the __repr__ example in the repr() docs mainly avoid manual quoting and to help steer users away from patterns that lead security and correctness issues.


📚 Documentation preview 📚: https://cpython-previews--146273.org.readthedocs.build/

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot bot commented Mar 22, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Mar 22, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Mar 22, 2026
@petersuttondev petersuttondev changed the title Use !r in __repr__ example Docs: Use !r in __repr__ example Mar 22, 2026
@rhettinger rhettinger merged commit 021ee7f into python:main Apr 1, 2026
33 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants